import fetch from 'common/src/utils/fetch'
/**
 * 查询前5个未读消息列表
 */
export function findTopFiveCommonMessage(data) {
  return fetch({
    url: '/api/commonservice/commonMessage/findTopFiveCommonMessage',
    method: 'get',
    data: data,
  })
}

/**
 * 查询消息通知列表
 */
export function findCommonMessageList(data) {
  return fetch({
    url: '/api/commonservice/commonMessage/findCommonMessageList',
    method: 'post',
    data: data,
  })
}

/**
 * 查看消息通知详情
 */
export function findCommonMessageById(id) {
  return fetch({
    url: '/api/commonservice/commonMessage/findCommonMessageById?id=' + id,
    method: 'get',
  })
}

/**
 * 查询未读消息数
 */
export function countCommonMessage() {
  return fetch({
    url: '/api/commonservice/commonMessage/countCommonMessage',
    method: 'get',
  })
}

/**
 * 删除消息通知
 */
export function deleteCommonMessage(data) {
  return fetch({
    url: '/api/commonservice/commonMessage/deleteCommonMessage',
    method: 'delete',
    data
  })
}

/**
 * 更改消息状态
 */
export function markRead(data) {
  return fetch({
    url: '/api/commonservice/commonMessage/markRead',
    method: 'put',
    data
  })
}


